
<%@page import="java.util.List"%>
<%@page import="ejb.Utente"%>
<%@page import="ejb.ArticoloNuovo"%>
<%@page import="ejb.ArticoloUsato"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@include file="wrapper.jsp" %>

<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="span8">

    <div class="thumbnail">
    <center>
    <h3>Inserisci Articolo Usato</h3>
    <br>
    
    <div id="content">
    

        <div id="cornice">
        
            <form action="Controller" method="POST">
	
                Nome: <input type="text" name="nomeArtUsato"><br />
          	Descrizione Generale: <input type="text" name="descrizioneArtUsato" /><br /> 
                Prezzo: <input type="text" name="prezzoArtUsato"><br />       
                Confermato: <select name="confermaArtUsato"> 
                            <option  value="true">True</option>
                            <option  value="false">False</option>
                            </select><br />
                Commento: <input type="text" name="commentoArtUsato"><br /><br />
                Utente:<select name="idUtenteArtUsato">
                <%
                String id;
                List<Utente> utenti = (List<Utente>)session.getAttribute("listaUtenti");
                
                for(Utente u:utenti) {
                    id =u.getId().toString();
                %>
                    <option value="<%=id%>"><%=u.getNome()%></option><%}%>
                </select>
		<input type="submit" value="inserisciArtUsato" name="button"/>
            </form>
            
        </div>
   </center>
                           
   </div><br><br>
   
   
   <hr width="600"> 
   
   <div id="content">
   <center>
    <h3>Modifica Articolo Usato</h3>		            

    <div id="cornice">
         <form action="Controller" method="POST">
            <select name="idArticoloUsatoEdit">
            <%
            String idMod;
            List<ArticoloUsato> l = (List<ArticoloUsato>)session.getAttribute("artUsati");
            
            for(ArticoloUsato a:l) {
                idMod =a.getId().toString();
            %>
                <option  value="<%=idMod%>"><%=a.getNome()%></option><% }%>
            </select>
	    <input type="submit" value="modificaArtUsato" name="button"/>
        </form>
     </div>
   </center>
   
   </div><br><br>
   
   <hr width="600"> 
   
   <div id="content">
   <center>
   <h3>Cancella Articolo Usato</h3>		            

   <div id="cornice">
   
       <form action="Controller" method="POST">
             Articolo:<select name="idArtUsato">
             <%
             List<ArticoloUsato> articoliUsati =(List<ArticoloUsato>)session.getAttribute("artUsati");
                                                
             for(ArticoloUsato a:articoliUsati) {
                 id =a.getId().toString();
             %>
                 <option value="<%=id%>"><%=a.getNome()%></option><%}%>
            </select>
	    <input type="submit" value="cancellaArtUsato" name="button"/>
        </form>
   </div>
   </center>
                           
   </div><br><br>
   </div>           
   </div> 
   <iframe src="https://www.google.com/calendar/embed?src=f7ni105q3cfp27s1t374amoqug%40group.calendar.google.com&ctz=Europe/Rome" style="border: 0" width="320" height="240" frameborder="0" scrolling="no" align="right">></iframe>
   </div>
   </div>
</div>

</body>
</html>
 